import React, {useState, useEffect} from 'react'
import { getUsers } from '../api/github.ts'

export default function AxiosTest() {
    let [ users, setUsers] = useState([])
    useEffect(() => {
        async function main(){
            let res = await getUsers('aa')
            console.log(res);
            setUsers(res.items)
            console.log(users);
            
        }
        main()
    }, [])
  return (
    <div>
        <h3>AxiosTest</h3>
      {users[0]}
    </div>
  )
}
